namespace MusicStore.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class MusicStore2 : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.Classes",
                c => new
                    {
                        ClassesId = c.Int(nullable: false, identity: true),
                        Name = c.String(),
                        StudentNumber = c.Double(nullable: false),
                        College_CollegeId = c.Int(),
                    })
                .PrimaryKey(t => t.ClassesId)
                .ForeignKey("dbo.Colleges", t => t.College_CollegeId)
                .Index(t => t.College_CollegeId);
            
            CreateTable(
                "dbo.Colleges",
                c => new
                    {
                        CollegeId = c.Int(nullable: false, identity: true),
                        Name = c.String(),
                    })
                .PrimaryKey(t => t.CollegeId);
            
            DropColumn("dbo.Students", "Gender");
            DropColumn("dbo.Students", "height");
            DropColumn("dbo.Students", "weight");
        }
        
        public override void Down()
        {
            AddColumn("dbo.Students", "weight", c => c.Double(nullable: false));
            AddColumn("dbo.Students", "height", c => c.Double(nullable: false));
            AddColumn("dbo.Students", "Gender", c => c.Boolean(nullable: false));
            DropForeignKey("dbo.Classes", "College_CollegeId", "dbo.Colleges");
            DropIndex("dbo.Classes", new[] { "College_CollegeId" });
            DropTable("dbo.Colleges");
            DropTable("dbo.Classes");
        }
    }
}
